<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="Pg-Type" content="nav">
<title>服务标签 - 我的管理中心</title>
{include file="head"}
<link href="/static/thinkct/css/basic.css?v=1" rel="stylesheet" type="text/css" /><script language="javascript" src="/static/thinkct/js/jquery.m.js"></script><script language="javascript" src="/static/thinkct/js/layui/layui.js"></script><script language="javascript" src="/static/thinkct/js/common.js?v=1"></script><script language="javascript" src="/static/thinkct/js/member.js?v=1"></script><link href="/static/thinkct/css/member.css?v=1" rel="stylesheet" type="text/css" /><link href="/static/thinkct/js/layui/css/layui.css" rel="stylesheet" type="text/css" /></head>
<body>
<!--头部-->
{include file="uhead"}

<!--头部-->
<div class="umain">
{include file="uleft"} 
<div class="uright">
<div class="mwz">
<li ><a href="shop">基本设置</a></li><li ><a href="service">客服</a></li><li ><a href="nav">导航</a></li><li class="cur"><a>技能</a></li><li ><a href="commend">推荐</a></li><li ><a href="style">风格</a></li><li ><a href="slide">幻灯片</a></li><li ><a href="/member/promotion/sell">推广</a></li><li class="prompt r"><a href='{:sysconf("site_domain")}/ishop{$data.id}/' target="_blank">我的店铺</a></li>
  </div>
<form class="layui-form layui-font14">
<div class="layui-form-item">
   <label class="layui-form-label">已添加标签</label>
    <div class="layui-input-block">
	<div class="plus-tag tagbtn">
	{foreach($data.slideshow as $v)}
		{if($v != null)}
		<a><i title="前移">《</i><span title="{$v}">{$v}</span><em title="删除">X</em></a>
		{/if}
	{/foreach}
	</div>
	</div> 
</div>
<div class="layui-form-item">
   <label class="layui-form-label">添加标签</label>

    <div class="layui-inline"><input id="tag_inp" name="" style="float:left;" type="text" class="layui-input checkLen" d_len='7'  maxlength="14" /></div><div class="layui-inline"><button type="button"  class="tag_add" >添加</button></div>
	
	<div class="layui-inline"><div class="layui-form-mid layui-word-aux">您还可以输入 <b id="check_count">7</b> 个字</div></div> 
</div>

<div class="layui-form-item">
   <label class="layui-form-label">&nbsp;</label>
    <div class="layui-inline"><b><a class="plus-tag-add">展开推荐技能标签</a></b></div> 
</div>

<div class="default-tag tagbtn" style="display:none;">
<div class="layui-form-item">
   <label class="layui-form-label">网站：</label>   <div class="layui-input-block">
<a title="网站定制"><em>+</em><span>网站定制</span></a><a title="网站仿制"><em>+</em><span>网站仿制</span></a><a title="前端开发"><em>+</em><span>前端开发</span></a><a title="网站二次开发"><em>+</em><span>网站二次开发</span></a><a title="网站改版"><em>+</em><span>网站改版</span></a>
</div></div> 
<div class="layui-form-item">
   <label class="layui-form-label">软件：</label>   <div class="layui-input-block">
<a title="软件定制"><em>+</em><span>软件定制</span></a><a title="插件开发"><em>+</em><span>插件开发</span></a><a title="软件二次开发"><em>+</em><span>软件二次开发</span></a><a title="软件测试"><em>+</em><span>软件测试</span></a><a title="软件升级"><em>+</em><span>软件升级</span></a>
</div></div> 
<div class="layui-form-item">
   <label class="layui-form-label">设计：</label>   <div class="layui-input-block">
<a title="软件设计"><em>+</em><span>软件设计</span></a><a title="网站设计"><em>+</em><span>网站设计</span></a><a title="移动应用设计"><em>+</em><span>移动应用设计</span></a><a title="广告设计"><em>+</em><span>广告设计</span></a><a title="logo设计"><em>+</em><span>logo设计</span></a><a title="PPT制作"><em>+</em><span>PPT制作</span></a><a title="美工"><em>+</em><span>美工</span></a>
</div></div> 
<div class="layui-form-item">
   <label class="layui-form-label">APP：</label>   <div class="layui-input-block">
<a title="APP开发"><em>+</em><span>APP开发</span></a><a title="IOS开发"><em>+</em><span>IOS开发</span></a><a title="android开发"><em>+</em><span>android开发</span></a><a title="微信开发"><em>+</em><span>微信开发</span></a><a title="APP测试"><em>+</em><span>APP测试</span></a>
</div></div> 
<div class="layui-form-item">
   <label class="layui-form-label">推广：</label>   <div class="layui-input-block">
<a title="SEO优化"><em>+</em><span>SEO优化</span></a><a title="广告投放"><em>+</em><span>广告投放</span></a><a title="微信推广"><em>+</em><span>微信推广</span></a><a title="微博推广"><em>+</em><span>微博推广</span></a><a title="营销策划"><em>+</em><span>营销策划</span></a><a title="软文代写"><em>+</em><span>软文代写</span></a><a title="软文发布"><em>+</em><span>软文发布</span></a>
</div></div> 
<div class="layui-form-item">
   <label class="layui-form-label">服务器：</label>   <div class="layui-input-block">
<a title="Linux服务"><em>+</em><span>Linux服务</span></a><a title="windows服务"><em>+</em><span>windows服务</span></a><a title="服务器安全防护"><em>+</em><span>服务器安全防护</span></a><a title="服务器环境配置"><em>+</em><span>服务器环境配置</span></a>
</div>
</div> 
</div>

<div class="layui-form-item" style="padding-bottom:15px;">
    <label class="layui-form-label"></label>
    <div class="layui-input-block"><input type="button" class="layui-btn"  lay-submit="" value="确认提交"></div>
</div>
</form>

<div class='notes notes_ber'>
	<li> <h3>技能说明：</h3></li>
	<li><b>1.</b>您可以在此添加擅长的技能或可承接的项目，会在店铺首页展示，最多允许设置10个。</li>
</div>
</div>
 </div>
{include file="bottom"}</body>
<script type="text/javascript">

layui.use('form', function(){
var form = layui.form();
	form.on('submit', function(data) {
		var tagarr='';
		progress(true);
		$(".plus-tag a").each(function(){
			tagarr+=$(this).children('span').attr('title')+",";
		}); 
		Aform('shop_admin',"object=skill&data="+tagarr);
		return false;
	});
});


$(document).ready(function() {
	var tag_Max=10;
	$('.plus-tag em').live('click', function(){
		$(this).parent().remove();
		$(".default-tag a[title='"+$(this).prev().attr('title')+"']").removeClass('selected');
	});

	$('.plus-tag i').live('click', function(){
		if($(".plus-tag a").length<2){
			layer.alert("亲，就我1个，您想移哪去？",{icon:0});return false;
		}
		var $this=$(this).parent();
		if($this.prev().length>0){
			$this.prev().before($this);  
		}else{
			$(".plus-tag a:last").after($this);
		}
	});

	$('.tag_add,.default-tag a:not(.selected)').live('click', function(){
		var $this=$(this),$val=$this.attr('title');
		if($(this).attr('type')=='button'){
			$this=$('#tag_inp');
			$val=$this.val();
		}
		var tagarr = new Array(); 
		$(".plus-tag a").each(function(){ 
			 tagarr.push($(this).children('span').attr('title').replace(/\s+/g, ""));
		}); 
		if($.inArray($val.replace(/\s+/g, ""),tagarr)>=0){
			layer.alert("技能标签【"+$val+"】已存在，无法重复添加！",{icon:0});return false;
		}
		if($(".plus-tag a").length>=tag_Max){
			layer.alert("最多只能添加"+tag_Max+"个技能标签！",{icon:0});return false;
		}

		if($val.length<2){
			layer.tips('技能标签不能少于2个字符！','#tag_inp',{tips:3});$('#tag_inp').focus();return false;
		}
		$('.plus-tag').append("<a><i title='前移'>《</i><span title="+$val+">"+$val+"</span><em title='删除'>X</em></a>"); 
		$(".default-tag a[title='"+$val+"']").addClass('selected');
		if($(this).attr('type')=='button'){
			$('#tag_inp').val('');
			$('#tag_inp').focus();
		}
	});

	$('.plus-tag-add').click(function(){
		var str = ['查看推荐技能标签', '收起推荐技能标签'],$con = $('.default-tag');
		if(!$con.is(":hidden")){
			$(this).html(str[0]);
			$con.hide();
		}else{
			$(this).html(str[1]);
			$con.show();
		}
	});
});
</script>
</html>